package com.distortiongames.escalol.actor.player 
{
	import com.distortiongames.elysium.components.MouseFollowComponent;
	import com.distortiongames.elysium.components.VectorComponent;
	import com.distortiongames.escalol.components.render.CircleRenderer;
	import com.distortiongames.escalol.components.render.settings.TrailRenderer;
	import com.pblabs.core.PBGameObject;
	
	
	/**
	 * ...
	 * @author Jefferson Wagner
	 */
	public class Player extends PBGameObject
	{
		//{ region Fields
		private var _position:VectorComponent;
		private var _renderer:CircleRenderer;
		private var _mouseFollow:MouseFollowComponent;
		//}
		
		//{ region Properties
		public function get position():VectorComponent 
		{
			return _position;
		}
		
		public function set position(value:VectorComponent):void 
		{
			_position = value;
		}
		
		public function get renderer():CircleRenderer 
		{
			return _renderer;
		}
		
		public function set renderer(value:CircleRenderer):void 
		{
			_renderer = value;
		}
		
		public function get mouseFollow():MouseFollowComponent 
		{
			return _mouseFollow;
		}
		
		public function set mouseFollow(value:MouseFollowComponent):void 
		{
			_mouseFollow = value;
		}
		//}
		
		override public function initialize():void 
		{
			_position = new VectorComponent();
			_renderer = new TrailRenderer();
			_mouseFollow = new MouseFollowComponent();
			_position.addBinding("vector", "@mouseFollow.position");
			_renderer.addBinding("position", "@position.vector");
			_renderer.fill.color = 0xFFFFFF;
			_renderer.radius = 10;
			super.initialize();
			
		}
		
		override public function destroy():void 
		{
			super.destroy();
		}
	}

}